//
//  BannerModel.swift
//  E-CycleForShop
//
//  Created by enghou on 17/3/2.
//  Copyright © 2017年 xyxorigation. All rights reserved.
//

import UIKit

class BannerModel: BaseModel {
    var itemModels : Array<BannerItemModel> = []
    override init(source sourceDt: Dictionary<String, Any>?) {
        super.init(source: sourceDt)
        let dt = self.data as? Dictionary<String,Any>
        guard dt != nil else {
            return
        }
        let list = dt!["list"] as? Array<Dictionary<String,Any>>
        guard list != nil else {
            return
        }
        for dict in list! {
            let model = BannerItemModel.init(source: dict)
            itemModels.append(model)
        }
        self.data = nil
    }
    deinit {
        print("BannerModel被释放了")
    }
}
